<?php

namespace app\base\command;


use app\base\model\RedianData;
use app\base\model\RedianTask;
use app\base\service\TaskService;
use think\admin\Command;
use think\console\Input;
use think\console\Output;
/**
 * 删除24小时前未支付的订单
 * Class SmsNum
 * @package app\common\command
 */
class RemoveOrder extends Command
{
    /**
     * 配置指令
     */
    protected function configure()
    {
        $this->setName('xbase:RemoveOrder');
        $this->setDescription('RemoveOrder');
    }

    protected function execute(Input $input, Output $output)
    {
        $num = $this->app->db->name("member_order")->where(['status'=>1])
            ->whereTime('create_at', '<',date('Y-m-d H:i:s', strtotime("-1 day")))->delete();
       // $this->app->db->name("redian_push_schedule")->where(['task_id'=>$task_id])->update(['status'=>1]);

        $this->setQueueSuccess("任务完成,共删除{$num}条数据");


    }



}
